/**
 * Copyright(c) 2025 hbswxx.com, All Rights Reserved. Author: kouqiang Create date: 2025/5/29
 */
package cn.sw.syncdata.remote.mapper;

import cn.sw.syncdata.entity.HeartInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * description: 远程mapper 心跳数据表，用于读取
 *
 * @author kouqiang
 * @date 2025/5/29 13:28
 */
public interface IRemoteDataBaseHeaderMapper extends BaseMapper<HeartInfo> {
    /**
     * description: 查询数据
     *
     * @param lastId 最后id
     * @param limit  获取数据量
     * @author kouqiang
     * @date 2025/5/29 13:29
     * @return: java.util.List<cn.sw.syncdata.entity.HeartInfo>
     */
    @Select("select * from heartinfo_tab where id > #{lastId} limit #{limit}")
    List<HeartInfo> queryHeaders(@Param("lastId") long lastId, @Param("limit") int limit);
}
